package com.simple.cms.common.result;




import com.simple.cms.common.enums.ResultCode;

import java.io.Serializable;

public class CommonResult implements Serializable {

    private static final long serialVersionUID = 7070149896025566800L;
    /**
     * 返回code
     */
    private int code;

    /**
     * 结果描述
     **/
    private String message;

    public CommonResult() {
        this.code = ResultCode.SUCCESS.getCode();
        this.message = ResultCode.SUCCESS.getMsg();
    }

    public CommonResult(ResultCode resultCode) {
        this.code = resultCode.getCode();
        this.message = resultCode.getMsg();
    }


    public CommonResult(int bizCode, String bizMsg) {
        this.code = bizCode;
        this.message = bizMsg;
    }


    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
